/**
 * 
 */
package br.com.consultsystems.negocio.impl.financeiro;

import java.util.List;

import javax.ejb.EJB;
import javax.ejb.Stateless;

import br.com.consultsystems.dominio.financeiro.Historico;
import br.com.consultsystems.dominio.tipos.TipoHistorico;
import br.com.consultsystems.negocio.spec.financeiro.HistoricoNegocio;
import br.com.consultsystems.persistencia.spec.financeiro.HistoricoPersistencia;

/**
 * @author Moralles
 *
 */
@Stateless(name = "historicoNegocio")
public class HistoricoNegocioImpl implements HistoricoNegocio {

	@EJB
	private HistoricoPersistencia historicoPersistencia;
	
	@Override
	public Historico merge(Historico t) throws Exception {
		return historicoPersistencia.merge(t);
	}

	@Override
	public Historico retrieve(Long id) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void remove(Historico t) throws Exception {
		t = this.merge(t);
		historicoPersistencia.remove(t);
	}

	@Override
	public void refresh(Historico t) throws Exception {
		historicoPersistencia.refresh(t);
	}

	@Override
	public List<Historico> retrieveAll() throws Exception {
		return historicoPersistencia.retrieveAll();
	}

	@Override
	public List<Historico> retrieveByFilter(String descricao) throws Exception {
		return historicoPersistencia.retrieveByFilter(descricao);
	}

	@Override
	public List<Historico> retrieveByFilter(String descricao,
			TipoHistorico tipoHistorico) throws Exception {
		return historicoPersistencia.retrieveByFilter(descricao, tipoHistorico);
	}

	
}
